<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});


Route::prefix('v1')->middleware('verify.mini')->group(function() {
    Route::get('news/lists', [\App\Http\Controllers\Api\V1\NewsController::class, 'lists']);
    Route::post('', []);
});


Route::prefix('v1')->group(function() {
    Route::post('user/login', [\App\Http\Controllers\Api\V1\UserController::class, 'login']);
    Route::get('send', [\App\Http\Controllers\Api\V1\UserController::class, 'sendMessage']);
    Route::post('upload', [\App\Http\Controllers\Api\V1\UserController::class, 'upload']);
});

//
//Route::group(['prefix' => 'v1', 'namespace' => 'Api\V1'], function(){
//    Route::get('news/lists', [\App\Http\Controllers\Api\V1\NewsController::class, 'lists']);
//
//
//});


// 中间件













